<template>
  <div>
    {{ $store.state.A.list }}
    <br />
    {{ $store.state.B.name }}
    <br />
  </div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
  computed: {
    ...mapState(["A/list"]),
    ...mapState(["B/list"]),
    ...mapState(["name"]), //根状态
  },
  methods: {
    // ...mapState(["A/steList", "B/setNames"]),
    ...mapMutations("A/", ["setList"]),
  },
  mounted() {
    // this["A/list"]("我是新的值");
    // this["B/list"]("我也是新的值");
    this.setList(123456);
  },
};
</script>